package com.example.huayang.appdome.utils;

import android.widget.Toast;

import com.example.huayang.appdome.MyApplication;


/**
 * Created by llp on 2017/8/21.
 */

public class ToastUtil {

    public static Toast toast;

    //弹出toast
    public static void showToast(String text) {

        if (toast == null) {
            toast = Toast.makeText(MyApplication.getInstance(), text, Toast.LENGTH_SHORT);
        } else {
            toast.setText(text);
        }
        toast.show();
    }
}
